﻿// Copyright (c) 2007-2021 西安交通信息投资营运有限公司 版权所有
// 作者:吕艳阳

using DevExpress.XtraSplashScreen;
using XCI.Windows;

namespace XCI.Core
{
    /// <summary>
    /// 提供应用程序全局默认选项
    /// </summary>
    public static class AppDefaultSettings
    {
        /// <summary>
        /// 加载提示面板默认选项
        /// </summary>
        public static OverlayWindowOptions DefaultOverlayWindowOptions
        {
            get => LoadingMask.DefaultOverlayWindowOptions;
            set => LoadingMask.DefaultOverlayWindowOptions = value;
        }

        /// <summary>
        /// 滚动加载分页控件-默认每页大小
        /// </summary>
        public static int GridInfinitePagingDefaultPageSize
        {
            get => GridControlInfinitePaging.DefaultPageSize;
            set => GridControlInfinitePaging.DefaultPageSize = value;
        }

        /// <summary>
        /// 标准分页控件-默认每页大小
        /// </summary>
        public static int GridStandardPagingDefaultPageSize
        {
            get => GridControlStandardPaging.DefaultPageSize;
            set => GridControlStandardPaging.DefaultPageSize = value;
        }

        /// <summary>
        /// 标准分页控件-分页大小下拉列表(多个之间逗号隔开)
        /// </summary>
        public static string GridStandardPagingDefaultPageSizeList
        {
            get => GridControlStandardPaging.DefaultPageSizeList;
            set => GridControlStandardPaging.DefaultPageSizeList = value;
        }

        /// <summary>
        /// 标准分页控件-刷新按钮延迟时间(毫秒)
        /// </summary>
        public static int GridStandardPagingDefaultRefreshDelay
        {
            get => GridControlStandardPaging.DefaultRefreshDelay;
            set => GridControlStandardPaging.DefaultRefreshDelay = value;
        }

        /// <summary>
        /// 下拉分页表格控件-下拉表格弹出框默认宽度
        /// </summary>
        public static int PopupGridControlPagingEditDefaultPopupWidth
        {
            get => PopupGridControlPagingEdit.DefaultPopupWidth;
            set => PopupGridControlPagingEdit.DefaultPopupWidth = value;
        }

        /// <summary>
        /// 下拉分页表格控件-下拉表格弹出框默认高度
        /// </summary>
        public static int PopupGridControlPagingEditDefaultPopupHeight
        {
            get => PopupGridControlPagingEdit.DefaultPopupHeight;
            set => PopupGridControlPagingEdit.DefaultPopupHeight = value;
        }

        public static string LayoutStoreCurrentName { get; set; } = "current";//当前文件名称,不带后缀名
        public static string LayoutStoreDefaultName { get; set; } = "default";//默认文件名称,不带后缀名


        public static string LayoutStoreLocalRootCatalog { get; set; } = "setting";//布局配置本地存储根目录
        public static string LayoutStoreServerRootCatalog { get; set; } = "setting";//布局配置服务器存储根目录

        public static string ReportStoreLocalRootCatalog { get; set; } = "report";//Report配置本地存储根目录
        public static string ReportStoreServerRootCatalog { get; set; } = "report";//Report配置服务器存储根目录

        public static string WidgetStoreLocalRootCatalog { get; set; } = "widget";//Widget配置本地存储根目录
        public static string WidgetStoreServerRootCatalog { get; set; } = "widget";//Widget配置服务器存储根目录

        /// <summary>
        /// 合并验证消息最大数
        /// </summary>
        public static int ValidationResultMergeMaxCount { get; set; } = 5;

        /// <summary>
        /// 是否允许自定义LayoutControl配置
        /// </summary>
        public static bool AllowCustomLayoutControlSetting { get; set; } = true;

        /// <summary>
        /// 是否允许自定义GridControl配置
        /// </summary>
        public static bool AllowCustomGridControlSetting { get; set; } = true;

        /// <summary>
        /// 是否允许自定义TreeControl配置
        /// </summary>
        public static bool AllowCustomTreeControlSetting { get; set; } = true;

        /// <summary>
        /// 是否允许自定义ChartControl配置
        /// </summary>
        public static bool AllowCustomChartControlSetting { get; set; } = true;

        /// <summary>
        /// 是否允许自定义Widget配置
        /// </summary>
        public static bool AllowCustomWidgetSetting { get; set; } = true;

        /// <summary>
        /// 是否允许自定义设计报表
        /// </summary>
        public static bool AllowCustomReportDesign { get; set; } = true;
    }
}